﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Billing.DataObjects
{
    public static class ShellSettings
    {
        private static Dictionary<string, Setting> Setting = new Dictionary<string, Setting>();
        static ShellSettings()
        {
            ShellDataContext context = new ShellDataContext();
            foreach (Setting s in context.Settings)
            {
                Setting.Add(s.KEY, s);
            }
        }

        public static long LastCallID
        {
            get
            {
                return Setting["LastCallID"].LongValue.Value;
            }
        }
        public static long DebitorAccountSequence
        {
            get
            {
                return Setting["DebitorAccountSequence"].LongValue.Value;
            }
        }
        public static long OwnerCompany
        {
            get
            {
                return Setting["OwnerCompany"].LongValue.Value;
            }
        }
        public static long InvoiceSequence
        {
            get
            {
                return Setting["InvoiceSequence"].LongValue.Value;
            }
        }
        public static long SimplifyInvoiceSequence
        {
            get
            {
                return Setting["SimplifyInvoiceSequence"].LongValue.Value;
            }
        }
        public static string InvoiceSerial
        {
            get
            {
                return Setting["InvoiceSerial"].StringValue;
            }
        }
        public static long LastClosedPeriod
        {
            get
            {
                return Setting["LastClosedPeriod"].LongValue.Value;
            }
        }
    }
}
